class Vector2:
    """
        二维向量
    """

    def __init__(self, x, y):
        self.x = x
        self.y = y

    @staticmethod
    def right():
        """
            向右
        :return:
        """
        return Vector2(0, 1)

    @staticmethod
    def left():
        """
            向左
        :return:
        """
        return Vector2(0, -1)

    @staticmethod
    def up():
        """
            向右
        :return:
        """
        return Vector2(-1, 0)

    @staticmethod
    def down():
        """
            向下
        :return:
        """
        return Vector2(1, 0)


class DoubleListHelper:

    @staticmethod
    def get_elements(list_target, v_pos, v_dir, count):
        elements = []
        for i in range(count):
            v_pos.x += v_dir.x
            v_pos.y += v_dir.y
            elements.append(list_target[v_pos.x][v_pos.y])

        return elements


list01 = [
    ["00", "01", "02", "03"],
    ["10", "11", "12", "13"],
    ["20", "21", "22", "23"]
]
re01 = DoubleListHelper.get_elements(list01, Vector2(1, 0), Vector2.right(), 3)
print(re01)

list_left = DoubleListHelper.get_elements(list01, Vector2(2, 3), Vector2.left(), 3)
print(list_left)

list_down = DoubleListHelper.get_elements(list01, Vector2(0, 2), Vector2.down(), 2)
print(list_down)
